<?php
	require_once 'Content.php';
	class News extends Content{
		private $order;
		private $visible;
		private $image;
		
		public function __construct($name,$text,$image,$order,$visible){
			$this->name 	= 	$name;
			$this->text		=	$text;
			$this->visible	= 	$visible;
			$this->image	=	$image;
			if ($order=="") {
				$this->order=null;
			} else {
				$this->order	=	$order;
			}
	
		}
		
		public function setId($id){
			if (is_numeric($id)) {
				$this->id=$id;
			} else {
				$dbb = new DB(); 
				$this->id= $dbb->takeArticleId($_POST['art_name']);
				unset($dbb);
			}
		}

	
		public function setOrder($order){
			$this->order=$order;
		}
		public function getOrder(){
			return $this->order;
		}
		
		public function setVisible($vis){
			$this->visible=$vis;
		}
		public function getVisible(){
			return $this->visible;
		}
		
		public function setImage($img){
			$this->image=$img;
		}
		public function getImage(){
			return $this->image;
		}
		
	}


?>